
a = 'ajssdaaaadsddss'

a = set(a)

a = list(a)
a.sort(reverse=False)

res = ''.join(a)

print(res)